//npm i webpack webpack-cli webpack-dev-server html-webpack-plugin -D
const path = require('path')
const HTMLWebpackPlugin = require('html-webpack-plugin') //自动将指定页面生成到内存指定目录
const htmlPlguin = new HTMLWebpackPlugin({ template: './src/index.html', filename: 'index.html' })

module.exports = {
    mode: "development",
    entry: path.join(__dirname, './src/main.js'), //入口js文件
    output: {
        filename: 'bundle.js',
        path: path.join(__dirname, './dist')
    },
    module: {
        rules: []
    },
    plugins: [ htmlPlguin ],
}